<?php get_header(); ?>

	<div id="content" class="widecolumn">

	<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

			<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
				<h1><?php the_title(); ?></h1>

				<?php if( has_post_thumbnail() ): ?>
					<?php the_post_thumbnail( 'medium' ); ?>
				<?php endif; ?>

				<dl class="portfolio-details">
					<?php if( cdia_portfolio_has_client() ): ?>
						<dt>Client:</dt><dd><?php echo cdia_the_portfolio_client(); ?>
					<?php endif; ?>
					<?php if( cdia_portfolio_has_year() ): ?>
						<dt>Completion Year:</dt><dd><?php echo cdia_the_portfolio_year(); ?>
					<?php endif; ?>
					<?php if( cdia_portfolio_has_site_url() ): ?>
						<dt>Site URL:</dt>
						<dd>
							<a href="<?php echo cdia_the_portfolio_site_url(); ?>" >
							<?php echo cdia_the_portfolio_site_url(); ?></a>
						</dd>
					<?php endif; ?>
					<?php if( cdia_portfolio_has_cms() ): ?>
						<dt>CMS:</dt><dd><?php echo cdia_the_portfolio_cms(); ?>
					<?php endif; ?>
				</dl>
				
				<div class="entry">
					<?php the_content(__('Read more', 'notesblog')); ?>
				</div>
				
				<?php if (is_single() || is_page()) { edit_post_link(__('Edit', 'notesblog'), '<p class="admin">Admin: ', '</p>'); wp_link_pages('before=<p class="pagelink">' . __('Pages:', 'notesblog') .' &after=</p>'); } ?>
			</div>
			

		<?php endwhile; ?>
		
			<div class="nav widecolumn">
				<div class="left"><?php next_posts_link(__('See next portfolio item', 'notesblog')) ?></div>
				<div class="right"><?php previous_posts_link(__('See last portfolio item', 'notesblog')) ?></div>
			</div>
		
	<?php endif;?>
		
	</div>

<?php get_sidebar(); ?>
<?php get_footer(); ?>